<template>
	<p data-name="张三"
		@click="showName">这是一段测试文本</p>
	<view class="uni-list-cell">
		<view class="uni-list-cell-left">
			当前选择
		</view>
		<view class="uni-list-cell-db">
			<picker @change="bindPickerChange"
				:value="index"
				:range="array">
				<view class="uni-input">{{array[index]}}</view>
			</picker>
		</view>
		<view class="uni-input">
			<picker mode="time"
				:value="time"
				start="09:01"
				end="21:01"
				@change="bindTimeChange">
				<view class="uni-input">{{time}}</view>
			</picker>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	const showName = e => {
		console.log(e, '00000');
	}
	const index = ref(0)
	const array = ['中国', '美国', '巴西', '日本']
	const bindPickerChange = function(e) {
		console.log('picker发送选择改变，携带值为', e.detail.value)
		index.value = e.detail.value
	}
	const time = ref("12:01")
</script>

<style>
</style>